/*! \file Node.cpp
 *	\brief 
 *
 *	created:	2009/11/24
 *	created:	24:11:2009   16:07
 *	filename: 	o:\gag-engine\libs\sg\Node.cpp
 *	file path:	o:\gag-engine\libs\sg
 *	file base:	Node
 *	file ext:	cpp
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */
#include "stdafx.h"
#include "Node.h"

#include <core/assert.h>

namespace tt{
namespace sg{

Node::Node()
: m_localTransformation()
{

}

Node::~Node()
{

}

Node* Node::parent() const
{
	return m_parent;
}

void Node::addChild( const SharedPtr<Node>& value )
{
	TT_ASSERT(value->m_parent == NULL);
	m_childs.push_back(value);
	value->m_parent = this;
}

const Nodes& Node::childs() const
{
	return m_childs;
}

void Node::setLocalTransformation( const math::Matrix4x4F& value )
{
	m_localTransformation = value;
}

const math::Matrix4x4F& Node::localTransformation() const
{
	return m_localTransformation;
}

} //namespace sg
} //namespace tt
